// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread 'AIMC' 





while true
    wait 0 
    if Player.Defined(0)
    jf continue
    Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
    if 0AE2: 0@ = random_vehicle_near_point 1@ 2@ 3@ in_radius 40.0 find_next 1 pass_wrecked 0 //IF and SET  
    jf continue
    if not 0@ == -1                                                                                                       
    jf continue
    if 056E:   car 0@ defined 
    jf continue                                                                                                        
    if not car.Wrecked(0@)                                                                                                
    jf continue
    4@ = CAR.Health(0@)
    IF 4@ == 1000
    jf continue
    CAR.Health(0@) = 1500                                                                                    
    //0A92: create_custom_thread "14FA51F5D0\AIM_CAR_HOOK.CS" {SEND HANDLER AS >} 
    0AB3: 100 > 0@
    0AB1: call_scm_func @startNewThread 1 labelName @AIM_CAR_HOOK                                                    
end


:AIM_CAR_HOOK
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP
0AB4: 0@ < 100 
0085: 11@ = 0@ // (int) 
0AC6: 14@ = label @XNONAME_125 offset 
0A8C: write_memory 14@ size 4 value 11@ virtual_protect 0 

:XNONAME_20
wait 0 
0AC6: 14@ = label @XNONAME_125 offset 
0A8D: 11@ = read_memory 14@ size 4 virtual_protect 0 
if 
056E:   car 11@ defined 
jf @XNONAME_58 
jump @XNONAME_61 
jump @XNONAME_5A 

:XNONAME_58
end_thread 

:XNONAME_5A
jump @XNONAME_20 

:XNONAME_61
Model.Load(3060)
038B: load_requested_models 
Car.StorePos(11@, 3@, 4@, 5@)
15@ = Object.Create(3060, 3@, 4@, 5@)
Object.Angle(15@) = 90.0
0681: attach_object 15@ to_car 11@ with_offset 0.0 0.0 0.0 rotation 0.0 0.0 0.0 
035D: set_object 15@ targetable 1 
071F: set_object 15@ health_to 99999 
Object.CollisionDetection(15@) = False
08D2: object 15@ scale_model 0.0 
050E: set_object 15@ no_collision_with_car 11@ 
0750: set_object 15@ visibility 1 

:XNONAME_E8
wait 0 
if or
8471:   not actor $PLAYER_ACTOR near_object_in_rectangle 15@ radius 50.0 50.0 sphere 0 
856E:   not car 11@ defined 
jf @XNONAME_117 
jump @XNONAME_11E 

:XNONAME_117
jump @XNONAME_E8 

:XNONAME_11E
Object.Destroy(15@)
end_thread 

:XNONAME_125
hex
 00 00 00 00
end
hex
 00 00 00 00
end